﻿using Microsoft.Office.Tools.Ribbon;

namespace ExcelPoSH
{
    public partial class PoSHRibbon : OfficeRibbon
    {
        public PoSHRibbon()
        {
            InitializeComponent();
        }

        private void PoSHRibbon_Load(object sender, RibbonUIEventArgs e)
        {

        }

        // Show - Hide the console control from the Excel ribbon

        private void btnShowHideConsole_Click(
            object sender, RibbonControlEventArgs e)
        {
            if (btnShowHideConsole.Checked)
            {
                Globals.ThisAddIn.ShowConsole();
            }
            else
            {
                Globals.ThisAddIn.HideConsole();
            }
        }
    }
}
